﻿@model GitCandy.Models.LoginModel

@{
    ViewBag.Title = String.Format(SR.Shared_TitleFormat, SR.Account_LoginTitle);
    var showadmin = ViewBag.ShowAdmin as String;
    var adminstr = "默认管理员 {0}/{0}".F(showadmin);
}

<h3>@SR.Account_LoginTitle</h3>

@using (Html.BeginForm("Login", "Account", new { ViewBag.ReturnUrl }, FormMethod.Post))
{
    <dl class="dl-horizontal col-md-8">
        <dt>@Html.DisplayNameFor(s => s.ID)</dt>
        <dd>@Html.TextBoxFor(s => s.ID, new { @class = "form-control" })</dd>

        <dt>@Html.DisplayNameFor(s => s.Password)</dt>
        <dd>@Html.PasswordFor(s => s.Password, new { @class = "form-control" })</dd>

        <dt></dt>
        <dd>@Html.ValidationSummary(true, SR.Account_LoginFailed, new { @class = "alert alert-dismissable alert-danger" })</dd>

        <dt></dt>
        <dd>
            <button type="submit" class="btn btn-primary">@SR.Shared_Login</button>
            @Html.ActionLink(SR.Account_ForgotPassword, "Forgot")
            @if (!showadmin.IsNullOrEmpty())
            {
                @adminstr
            }
        </dd>
    </dl>
}
